From: Julian Sparber Date: Wed, 6 Dec 2023 19:37:56 +0000 (+0100) Subject: notifications: Never use source icon for notifications X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~281^2~2^2~64 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=eb9118674d7870233367f10bf6f62b2745362c6b;p=gnome-shell.git notifications: Never use source icon for notifications With the new design we will show the source icon in the header of a notification. Part-of: --- diff --git a/data/theme/gnome-shell-sass/widgets/_message-list.scss b/data/theme/gnome-shell-sass/widgets/_message-list.scss index 0dc1ce3fe..15464bd80 100644 --- a/data/theme/gnome-shell-sass/widgets/_message-list.scss +++ b/data/theme/gnome-shell-sass/widgets/_message-list.scss @@ -77,12 +77,6 @@ icon-size: $large_icon_size; -st-icon-style: symbolic; } - - // fallback - > .fallback-app-icon { - width: $base_icon_size; - height: $base_icon_size; - } } // content diff --git a/js/ui/calendar.js b/js/ui/calendar.js index 176d26fe2..e83e31654 100644 --- a/js/ui/calendar.js +++ b/js/ui/calendar.js @@ -798,7 +798,7 @@ class NotificationMessage extends MessageList.Message { icon_size: MESSAGE_ICON_SIZE, }); } else { - return this.notification.source.createIcon(MESSAGE_ICON_SIZE); + return null; } } diff --git a/js/ui/mpris.js b/js/ui/mpris.js index f155e3774..bf73e0ef5 100644 --- a/js/ui/mpris.js +++ b/js/ui/mpris.js @@ -72,9 +72,6 @@ class MediaMessage extends MessageList.Message { let file = Gio.File.new_for_uri(this._player.trackCoverUrl); this._icon.gicon = new Gio.FileIcon({file}); this._icon.remove_style_class_name('fallback'); - } else if (this._player.app) { - this._icon.gicon = this._player.app.icon; - this._icon.add_style_class_name('fallback'); } else { this._icon.icon_name = 'audio-x-generic-symbolic'; this._icon.add_style_class_name('fallback'); diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js index c0cb8acff..d9eed69ba 100644 --- a/js/ui/notificationDaemon.js +++ b/js/ui/notificationDaemon.js @@ -212,12 +212,8 @@ class FdoNotificationDaemon { }); } - // 'image-data' (or 'image-path') takes precedence over 'app-icon'. let gicon = this._imageForNotificationData(hints); - if (!gicon) - gicon = this._iconForNotificationData(appIcon); - if (!gicon) gicon = this._fallbackIconForNotificationData(hints); @@ -278,7 +274,8 @@ class FdoNotificationDaemon { ? MessageTray.PrivacyScope.SYSTEM : MessageTray.PrivacyScope.USER); - let sourceGIcon = source.useNotificationIcon ? gicon : null; + // Only fallback to 'app-icon' when the source doesn't have a valid app + const sourceGIcon = source.app ? null : this._iconForNotificationData(appIcon); source.processNotification(notification, sourceGIcon); } @@ -337,8 +334,6 @@ class FdoNotificationDaemonSource extends MessageTray.Source { if (this.app) this.title = this.app.get_name(); - else - this.useNotificationIcon = true; if (sender) { this._nameWatcherId = Gio.DBus.session.watch_name(sender,